<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="EditAccount.aspx.cs" Inherits="EditAccount" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderAdmin" Runat="Server">

<h3 id="title">
    Edit role or discount for account
</h3>
<table style="margin:10px auto">
    <tr>
        <td>
            <asp:GridView ID="GVAccount" runat="server" Style="position: relative" AutoGenerateColumns="False" DataSourceID="OdsAaccount" DataKeyNames="Username" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="5">
                <Columns>
                    <asp:CommandField ShowEditButton="True" />
                    <asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" ReadOnly="True" />
                    <asp:BoundField DataField="Password" HeaderText="Password" SortExpression="Password" ReadOnly="True" />
                    <asp:BoundField DataField="SecretQuestion" HeaderText="SecretQuestion" SortExpression="SecretQuestion" ReadOnly="True" />
                    <asp:BoundField DataField="SecretAnswer" HeaderText="SecretAnswer" SortExpression="SecretAnswer" ReadOnly="True" />
                    <asp:BoundField DataField="Role" HeaderText="Role" SortExpression="Role" />
                    <asp:BoundField DataField="Discount" HeaderText="Discount" SortExpression="Discount" />
                </Columns>
                <RowStyle BackColor="White" ForeColor="#330099" />
                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
            </asp:GridView>
        </td>
    </tr>
</table>
    
    <asp:ObjectDataSource ID="OdsAaccount" runat="server" SelectMethod="GetAll" TypeName="Bll.AccountBll" UpdateMethod="UpdateDiscountAndRole">
        <UpdateParameters>
            <asp:Parameter Name="role" Type="String" />
            <asp:Parameter Name="discount" Type="String" />
            <asp:Parameter Name="username" Type="String" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>

